package com.anke.service;

import com.alibaba.dubbo.config.annotation.Service;
import com.anke.dao.StaffDao;
import com.anke.entity.Staff;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


@Service(interfaceClass = StaffService.class)
@Transactional
public class StaffServiceImpl implements StaffService {
    @Autowired
    private StaffDao staffDao;

    @Override
    public void StaffAdd(Staff staff) {
        staffDao.StaffAdd(staff);
    }

    @Override
    public void delete(int id) {
        staffDao.StaffDelete(id);
    }

    @Override
    public List<Staff> StaffAll() {
         return staffDao.StaffAll();
    }

    @Override
    public List<Staff> SelectByCompany(String companyName) {
        return staffDao.SelectByCompany(companyName);
    }


}
